Imports System
Imports System.Data.Common
Imports System.Collections
Imports System.Collections.Generic
Imports System.Text

Namespace ViewStateEliminator.Configuration
    Public Interface IUserUniqueID
        Function GetUniqueID() As String

    End Interface
    Public Class ViewStateHttpContextSessionID
        Implements IUserUniqueID
        Public Function GetUniqueID() As String Implements IUserUniqueID.GetUniqueID
            Return System.Web.HttpContext.Current.Session.SessionID
        End Function
    End Class
    Public Class ViewStateGUID
        Implements IUserUniqueID
        Public Function GetUniqueID() As String Implements IUserUniqueID.GetUniqueID
            Return System.Guid.NewGuid().ToString()
        End Function
    End Class
    Public Class ViewStateIpPageTimeStamp
        Implements IUserUniqueID
        Public Function GetUniqueID() As String Implements IUserUniqueID.GetUniqueID
            Return System.Web.HttpContext.Current.Request.UserHostAddress.ToString() & "@" & System.Web.HttpContext.Current.Request.RawUrl & "@" & DateTime.Now
        End Function
    End Class
End Namespace